package com.jilintongyi.jlcrtvu.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.Table;
import org.hibernate.annotations.Where;

@Entity
@Table(appliesTo = "sys_log", comment = "系统日志表")
public class SysLog extends BaseEntity {
	@ManyToOne(fetch = FetchType.EAGER)
	@Where(clause = "deleted=false")
	private SysUser user;

	@Column(nullable = false, columnDefinition = "text comment '内容'")
	private String content;

	@Column(columnDefinition = "varchar(255) default null comment 'IP地址'")
	private String ip;

	public SysUser getUser() {
		return user;
	}

	public void setUser(SysUser user) {
		this.user = user;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}
}
